package cn.zhentao.controller;

import cn.zhentao.pojo.Card;
import cn.zhentao.service.CardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("card")
public class CardController {
    @Autowired
    private CardService service;

    @RequestMapping("findAll")
    public Result findAll(){
        List<Card> cards = service.findAll();
        return new Result(Result.GET_OK,cards,null);
    }
}
